using RotovapPlatform.Domain.Common;
using RotovapPlatform.Domain.Equipment.Device.Robot.Dto;
using RotovapPlatform.Domain.Equipment.Device.Robot.Enums;
using RotovapPlatform.Domain.Equipment.Interfaces.CPG;
using RotovapPlatform.Domain.Equipment.PackML;
using System;
using System.Threading.Tasks;

namespace RotovapPlatform.Domain.Equipment.Interfaces.Robot;

/// <summary>
/// 机器人执行管理接口
/// </summary>
public interface IRobotEM : IUnitMachine
{
	string Name { get; }
	string EquipmentId { get; }
	PackMLState CurrentState { get; }
	PackMLMode CurrentMode { get; }

	event EventHandler<PackMLState> StateChanged;
	event EventHandler<PackMLMode> ModeChanged;

	Task<(RobotTaskFeedBackDto TaskFeedback, RobotStatusDto DeviceStatus)> GetStatusAsync();
	Task<OperationResult> StartAsync(ushort start);
	Task<OperationResult> SetTaskParametersAsync(RobotTaskSendDto task);
	Task<OperationResult> SendControlCommandAsync(RobotControlCommandDto command);
	Task<OperationResult> HandleProcessSignalsAsync(RobotProcessSignalsDto processSignals);
	Task<OperationResult> InitializeAsync();
	Task<OperationResult> StopAsync();
	Task<OperationResult> AbortAsync();
	Task<OperationResult> ClearAsync();
	Task<OperationResult> ResetAsync();
	Task<OperationResult> SuspendAsync();
	Task<OperationResult> UnsuspendAsync();
	Task<OperationResult> HoldAsync();
	Task<OperationResult> UnHoldAsync();
}